const webpack = require('webpack');
var nodemon = require('nodemon');
let config = require("./webpack.config");
const compiler = webpack(config);

compiler.watch({}, () =>
{
    if (!init) start();
});

let init = false;
function start()
{
    init = true;
    nodemon("");
    nodemon.on("crash", start);
}

console.log("输入rs重启服务器!");
